<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>检测对象类型</title>
</head>

<body>
    <p></p>
    <script>
        function test() {
            var a = 2;
            var a = 3;
            console.log(a);
        }
        test();
    </script>
</body>

</html>